package com.common.service.system;

import com.common.entity.standvalue.StandValueEntity;
import com.common.entity.system.DictionaryEntity;
import com.common.query.ConditionService;
import com.common.requestvo.standvalue.StandValueReqVo;
import com.common.requestvo.system.DictionaryReqVo;
import com.common.requestvo.system.DictionaryTypeReq;
import com.common.vo.standvalue.StandValueVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import java.util.List;

/**
 * @author johnny
 * @create 2021-05-13 9:31 上午
 **/
public interface DictionaryService  extends ConditionService<DictionaryEntity> {
    List<DictionaryEntity> findAll(Specification<DictionaryEntity> whereSpec);
    Page<DictionaryEntity> findAll(Specification<DictionaryEntity> whereSpec, Pageable pageable);

    List<DictionaryEntity> findByType(String[] typeArr);

    void saveDic(DictionaryEntity dictionaryEntity);

    void editDic(DictionaryEntity dictionaryEntity);

    void delete(Long id);

    Page<DictionaryEntity> listByCondition(DictionaryReqVo dictionaryReqVo, Pageable pageVo);

    List<DictionaryEntity> findByTypeList(DictionaryTypeReq dictionaryTypeReq);

    List<DictionaryEntity> findByTypeAndOrder(String caseIndexMappingMap);
}